Adsk Contrib - Add Support for SMPTE ST 2036-1 compliant CLF files#2265
Adsk Contrib - Add Support for SMPTE ST 2036-1 compliant CLF files#2265cozdas wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
…files. - Added "Id" element support per the spec. - Extended the CTFVersion class to handle non-numeric formats per the spec (which uses xmlns as the version) - CLF xml parser now strips the namespaces from the elements by default. This makes it possible to parse files with simple name spaces but complex name-spaced clf files may still fail. There is an internal switch to turn on/off the name space stripping. This way elements which need to retain the name spaces (such as the Info element) can still get the un-stripped names. - Extended the Input and Output Descriptor collection to hold multiple entries (similar to Description field) - CLF writer now writes the SMPTE xmlns version as well as the CompCLFVersion attribute. The resulting files can be read both by the Academy CLF parsers and SMPTE CLF parsers. - Generated cache hash IDs are now in the 8-4-4-4-12 UUID format to help complying with SMPTE id requirements - ociomakeclf tool now takes "--generateid" switch to for inserting newly added "Id element" into the target clf file. TODO: - Description and Descriptor elements need to collect the language attribute. - non-default namespace attributes (e.g. xmlns:foo) needs to be collected as root level attributes. - Those two TODO items need some re-factoring in the data collection code. Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
zachlewis
left a comment
There was a problem hiding this comment.
LGTM!
I may have missed this, but do we have tests for CLFs with more than one InputDescriptor / OutputDescriptor?
There was a problem hiding this comment.
Does this mean CTF Reference nodes do not support SMPTE-flavored CLF?
(I suppose I'm okay with this, since Reference nodes aren't publicly documented or explicitly supported)
There was a problem hiding this comment.
Yes, the smpte_all_metadata test in FileFormatCTF_tests.cpp checks multiple OutputDescriptors (line 1464).
References will support any loadable LUT format. The one the test uses happens to be pre-SMPTE, but I agree with you that it could give the wrong impression. We will update that to reference one of the other files.
Thanks for the quick review Zach!
| * preferred mechanism in the SMPTE ST 2036-1 version of the CLF format. If | ||
| * present, it is only available from the top-level FormatMetadata. | ||
| */ | ||
| extern OCIOEXPORT const char * METADATA_ID_ELEMENT; |
There was a problem hiding this comment.
Minor, should this be added to PyTypes.cpp?
Adding reading and writing support for SMPTE ST 2036-1 compliant CLF files
Added "Id" element support per the spec.
Extended the CTFVersion class to handle non-numeric formats per the spec (which uses xmlns as the version)
CLF xml parser now strips the namespaces from the elements by default. This makes it possible to parse files with simple name spaces but complex name-spaced clf files may still fail. There is an internal switch to turn on/off the name space stripping. This way elements which need to retain the name spaces (such as the Info element) can still get the un-stripped names.
Extended the Input and Output Descriptor collection to hold multiple entries (similar to Description field)
CLF writer now writes the SMPTE xmlns version as well as the CompCLFVersion attribute. The resulting files can be read both by the Academy CLF parsers and SMPTE CLF parsers.
Generated cache hash IDs are now in the 8-4-4-4-12 UUID format to help complying with SMPTE id requirements
ociomakeclf tool now takes "--generateid" switch for inserting newly added "Id element" into the target clf file.
TODO:
Description and Descriptor elements need to collect the language attribute.
non-default namespace attributes (e.g. xmlns:foo) need to be collected as root level attributes.
Those two TODO items need some re-factoring in the data collection code.